namespace igp.net.DataModel
{
    /// <summary>
    /// Represents a single monomial.
    /// </summary>
    public class IgpMonomial
    {
        /// <summary>
        /// Multiplier value.
        /// </summary>
        public double Multiplier { get; set; }

        /// <summary>
        /// Exponent value.
        /// </summary>
        public double Exponent { get; set; }

        /// <summary>
        /// The lower X limit. The monomial will add it's value only if the base of the exponent is greater than this limit 
        /// or if the Limited property is set to false;
        /// </summary>
        public double LowerXLimit { get; set; }

        /// <summary>
        /// The higher X limit. The monomial will add its value only if the base of the exponent is lower than this limit 
        /// or if the Limited property is set to false;
        /// </summary>
        public double HigherXLimit { get; set; }

        /// <summary>
        /// This property determines wheter the monomial will add its value not considering the base of the exponent (false) 
        /// or only if the base is in the range [ LowerXlimit ; HigherXLimit ).
        /// </summary>
        public bool Limited { get; set; }

        internal bool Selected { get; set; }

        /// <summary>
        /// Default constructor. Sets multiplier = 1 and exponent = 1.
        /// </summary>
        public IgpMonomial()
        {
            Multiplier = 1;
            Exponent = 1;
            LowerXLimit = 0;
            HigherXLimit = 1;
            Limited = false;
            Selected = false;
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="mn">Multiplier</param>
        /// <param name="wn">Exponent</param>
        public IgpMonomial(double mn, double wn)
        {
            Multiplier = mn;
            Exponent = wn;
            LowerXLimit = 0;
            HigherXLimit = 1;
            Limited = false;
            Selected = false;
        }
    }
}